﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using Digitalmes.Model.FactoryManagement;
using Digitalmes.Model;
using Digitalmes.Model.ProductManagement;

namespace Digitalmes.ViewModel.FactoryManagement.ProductionLineVMs
{
    public partial class ProductionLineTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._ProductionLine._Code")]
        public ExcelPropety Code_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.Code);
        [Display(Name = "_Model._ProductionLine._Name")]
        public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.Name);
        [Display(Name = "_Model._ProductionLine._Active")]
        public ExcelPropety Active_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.Active);
        [Display(Name = "_Model._ProductionLine._PrincipalId")]
        public ExcelPropety PrincipalId_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.PrincipalIdId);
        [Display(Name = "_Model._ProductionLine._Aux_1")]
        public ExcelPropety Aux_1_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.Aux_1);
        [Display(Name = "_Model._ProductionLine._Aux_2")]
        public ExcelPropety Aux_2_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.Aux_2);

        //[Display(Name = "_Model._ProductionLine._Product")]
        //public ExcelPropety Product_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.ProductId);

        [Display(Name = "_Model._ProductionLine._ProductName")]
        public ExcelPropety ProductName_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.ProductName);
        [Display(Name = "_Model._ProductionLine._CreateTime")]
        public ExcelPropety CreateTime_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.CreateTime, true);
        [Display(Name = "_Model._ProductionLine._UpdateTime")]
        public ExcelPropety UpdateTime_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.UpdateTime, true);
        [Display(Name = "_Model._ProductionLine._CreateBy")]
        public ExcelPropety CreateBy_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.CreateBy);
        [Display(Name = "_Model._ProductionLine._UpdateBy")]
        public ExcelPropety UpdateBy_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.UpdateBy);
        [Display(Name = "_Model._ProductionLine._IsValid")]
        public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.IsValid);
        [Display(Name = "_Model._ProductionLine._TenantCode")]
        public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<ProductionLine>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            //Product_Excel.DataType = ColumnDataType.ComboBox;
            //Product_Excel.ListItems = DC.Set<Product>().GetSelectListItems(Wtm, y => y.TenantCode.ToString());

        }

    }

    public class ProductionLineImportVM : BaseImportVM<ProductionLineTemplateVM, ProductionLine>
    {
            //import

    }

}